#pragma once

#include <gofcl_timer_r.h>

typedef enum {
	TIMER_CHCTL_0_R = TIMER_CHCTL0_R,
	TIMER_CHCTL_1_R = TIMER_CHCTL1_R,
} timer_chctl_re;

static inline timer_re timer_get_chctl_r(timer_chctl_re channel_r) {
	return (timer_re)channel_r;
}

static inline void timer_wreg_chctl(timer_qe timer_q, timer_chctl_re channel_r,
				    u32_s chctl) {
	timer_re chctl_r = timer_get_chctl_r(channel_r);
	timer_wreg_u16(timer_q, chctl_r, T16B_0_R, chctl);
}
